package org.finjic.annotated.processor.parser;

import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

/**
 * User: Taras
 * Date: 18.11.12
 * Time: 15:37
 */
public class AnnotationSaxHandler extends DefaultHandler {
    private String packageName;

    public void startElement(String uri, String localName, String qName,
                             Attributes attributes) throws SAXException {
        if(qName.equalsIgnoreCase("component-scan")){
            packageName = attributes.getValue("package");
        }
    }

    public String getPackageName() {
        return packageName;
    }
}
